package com.nanyang.tms.service.waybill.impl.flow;

import com.nanyang.common.core.domain.ApiRequest;
import com.nanyang.common.core.flow.context.TransHandlerContext;
import com.nanyang.common.core.flow.convert.TransConvert;
import com.nanyang.common.tool.utils.convert.BeanUtils;
import com.nanyang.tms.api.dto.request.waybill.WaybillShipmentAddRequest;
import com.nanyang.tms.domain.waybill.shipment.context.WaybillShipmentAddContext;

public class WaybillShipmentConvert implements TransConvert{

	@Override
	public TransHandlerContext convertRequest2Ctx(ApiRequest req, TransHandlerContext context) {
		WaybillShipmentAddRequest waybillShipmentAddRequest=(WaybillShipmentAddRequest)req;
		WaybillShipmentAddContext waybillShipmentAddContext=(WaybillShipmentAddContext)context;
		BeanUtils.copyProperties(waybillShipmentAddRequest, waybillShipmentAddContext.getCheckSupplierNoContext());
		BeanUtils.copyProperties(waybillShipmentAddRequest, waybillShipmentAddContext.getSaveWaybillShipmentContext());
		return waybillShipmentAddContext;
	}

}
